package com.zzyweb.rentalcarsys.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
 * @author zhiyi
 * @date 9/30/25
 **/
@TableName("news")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class News {
    @TableId(type = IdType.AUTO)
    private Long newsId;
    private String title;
    private String content;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime publishDate;
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime updateDate;
    private String author;

}
